<?php
	/**
	 * This is a MetaControl class, providing a QForm or QPanel access to event handlers
	 * and QControls to perform the Create, Edit, and Delete functionality
	 * of the TableWatchList class.  This code-generated class
	 * contains all the basic elements to help a QPanel or QForm display an HTML form that can
	 * manipulate a single TableWatchList object.
	 *
	 * To take advantage of some (or all) of these control objects, you
	 * must create a new QForm or QPanel which instantiates a TableWatchListMetaControl
	 * class.
	 *
	 * Any and all changes to this file will be overwritten with any subsequent
	 * code re-generation.
	 * 
	 * @package My Application
	 * @subpackage MetaControls
	 * property-read TableWatchList $TableWatchList the actual TableWatchList data class being edited
	 * property QLabel $IdControl
	 * property-read QLabel $IdLabel
	 * property QListBox $UserIdControl
	 * property-read QLabel $UserIdLabel
	 * property QListBox $ProjectIdControl
	 * property-read QLabel $ProjectIdLabel
	 * property QIntegerTextBox $WatchTypeIdControl
	 * property-read QLabel $WatchTypeIdLabel
	 * property QIntegerTextBox $AlertTypeIdControl
	 * property-read QLabel $AlertTypeIdLabel
	 * property QTextBox $UrlControl
	 * property-read QLabel $UrlLabel
	 * property QTextBox $TitleControl
	 * property-read QLabel $TitleLabel
	 * property QTextBox $DescriptionControl
	 * property-read QLabel $DescriptionLabel
	 * property QDateTimePicker $WatchDateControl
	 * property-read QLabel $WatchDateLabel
	 * property-read string $TitleVerb a verb indicating whether or not this is being edited or created
	 * property-read boolean $EditMode a boolean indicating whether or not this is being edited or created
	 */

	class TableWatchListMetaControlGen extends QBaseClass {
		// General Variables
		protected $objTableWatchList;
		protected $objParentObject;
		protected $strTitleVerb;
		protected $blnEditMode;

		// Controls that allow the editing of TableWatchList's individual data fields
		protected $lblId;
		protected $lstUser;
		protected $lstProject;
		protected $txtWatchTypeId;
		protected $txtAlertTypeId;
		protected $txtUrl;
		protected $txtTitle;
		protected $txtDescription;
		protected $calWatchDate;

		// Controls that allow the viewing of TableWatchList's individual data fields
		protected $lblUserId;
		protected $lblProjectId;
		protected $lblWatchTypeId;
		protected $lblAlertTypeId;
		protected $lblUrl;
		protected $lblTitle;
		protected $lblDescription;
		protected $lblWatchDate;

		// QListBox Controls (if applicable) to edit Unique ReverseReferences and ManyToMany References

		// QLabel Controls (if applicable) to view Unique ReverseReferences and ManyToMany References


		/**
		 * Main constructor.  Constructor OR static create methods are designed to be called in either
		 * a parent QPanel or the main QForm when wanting to create a
		 * TableWatchListMetaControl to edit a single TableWatchList object within the
		 * QPanel or QForm.
		 *
		 * This constructor takes in a single TableWatchList object, while any of the static
		 * create methods below can be used to construct based off of individual PK ID(s).
		 *
		 * @param mixed $objParentObject QForm or QPanel which will be using this TableWatchListMetaControl
		 * @param TableWatchList $objTableWatchList new or existing TableWatchList object
		 */
		 public function __construct($objParentObject, TableWatchList $objTableWatchList) {
			// Setup Parent Object (e.g. QForm or QPanel which will be using this TableWatchListMetaControl)
			$this->objParentObject = $objParentObject;

			// Setup linked TableWatchList object
			$this->objTableWatchList = $objTableWatchList;

			// Figure out if we're Editing or Creating New
			if ($this->objTableWatchList->__Restored) {
				$this->strTitleVerb = QApplication::Translate('Edit');
				$this->blnEditMode = true;
			} else {
				$this->strTitleVerb = QApplication::Translate('Create');
				$this->blnEditMode = false;
			}
		 }

		/**
		 * Static Helper Method to Create using PK arguments
		 * You must pass in the PK arguments on an object to load, or leave it blank to create a new one.
		 * If you want to load via QueryString or PathInfo, use the CreateFromQueryString or CreateFromPathInfo
		 * static helper methods.  Finally, specify a CreateType to define whether or not we are only allowed to 
		 * edit, or if we are also allowed to create a new one, etc.
		 * 
		 * @param mixed $objParentObject QForm or QPanel which will be using this TableWatchListMetaControl
		 * @param integer $intId primary key value
		 * @param QMetaControlCreateType $intCreateType rules governing TableWatchList object creation - defaults to CreateOrEdit
 		 * @return TableWatchListMetaControl
		 */
		public static function Create($objParentObject, $intId = null, $intCreateType = QMetaControlCreateType::CreateOrEdit) {
			// Attempt to Load from PK Arguments
			if (strlen($intId)) {
				$objTableWatchList = TableWatchList::Load($intId);

				// TableWatchList was found -- return it!
				if ($objTableWatchList)
					return new TableWatchListMetaControl($objParentObject, $objTableWatchList);

				// If CreateOnRecordNotFound not specified, throw an exception
				else if ($intCreateType != QMetaControlCreateType::CreateOnRecordNotFound)
					throw new QCallerException('Could not find a TableWatchList object with PK arguments: ' . $intId);

			// If EditOnly is specified, throw an exception
			} else if ($intCreateType == QMetaControlCreateType::EditOnly)
				throw new QCallerException('No PK arguments specified');

			// If we are here, then we need to create a new record
			return new TableWatchListMetaControl($objParentObject, new TableWatchList());
		}

		/**
		 * Static Helper Method to Create using PathInfo arguments
		 *
		 * @param mixed $objParentObject QForm or QPanel which will be using this TableWatchListMetaControl
		 * @param QMetaControlCreateType $intCreateType rules governing TableWatchList object creation - defaults to CreateOrEdit
		 * @return TableWatchListMetaControl
		 */
		public static function CreateFromPathInfo($objParentObject, $intCreateType = QMetaControlCreateType::CreateOrEdit) {
			$intId = QApplication::PathInfo(0);
			return TableWatchListMetaControl::Create($objParentObject, $intId, $intCreateType);
		}

		/**
		 * Static Helper Method to Create using QueryString arguments
		 *
		 * @param mixed $objParentObject QForm or QPanel which will be using this TableWatchListMetaControl
		 * @param QMetaControlCreateType $intCreateType rules governing TableWatchList object creation - defaults to CreateOrEdit
		 * @return TableWatchListMetaControl
		 */
		public static function CreateFromQueryString($objParentObject, $intCreateType = QMetaControlCreateType::CreateOrEdit) {
			$intId = QApplication::QueryString('intId');
			return TableWatchListMetaControl::Create($objParentObject, $intId, $intCreateType);
		}



		///////////////////////////////////////////////
		// PUBLIC CREATE and REFRESH METHODS
		///////////////////////////////////////////////

		/**
		 * Create and setup QLabel lblId
		 * @param string $strControlId optional ControlId to use
		 * @return QLabel
		 */
		public function lblId_Create($strControlId = null) {
			$this->lblId = new QLabel($this->objParentObject, $strControlId);
			$this->lblId->Name = QApplication::Translate('Id');
			if ($this->blnEditMode)
				$this->lblId->Text = $this->objTableWatchList->Id;
			else
				$this->lblId->Text = 'N/A';
			return $this->lblId;
		}

		/**
		 * Create and setup QListBox lstUser
		 * @param string $strControlId optional ControlId to use
		 * @return QListBox
		 */
		public function lstUser_Create($strControlId = null) {
			$this->lstUser = new QListBox($this->objParentObject, $strControlId);
			$this->lstUser->Name = QApplication::Translate('User');
			$this->lstUser->Required = true;
			if (!$this->blnEditMode)
				$this->lstUser->AddItem(QApplication::Translate('- Select One -'), null);
			$objUserArray = TableUserProject::LoadAll();
			if ($objUserArray) foreach ($objUserArray as $objUser) {
				$objListItem = new QListItem($objUser->__toString(), $objUser->Id);
				if (($this->objTableWatchList->User) && ($this->objTableWatchList->User->Id == $objUser->Id))
					$objListItem->Selected = true;
				$this->lstUser->AddItem($objListItem);
			}
			return $this->lstUser;
		}

		/**
		 * Create and setup QLabel lblUserId
		 * @param string $strControlId optional ControlId to use
		 * @return QLabel
		 */
		public function lblUserId_Create($strControlId = null) {
			$this->lblUserId = new QLabel($this->objParentObject, $strControlId);
			$this->lblUserId->Name = QApplication::Translate('User');
			$this->lblUserId->Text = ($this->objTableWatchList->User) ? $this->objTableWatchList->User->__toString() : null;
			$this->lblUserId->Required = true;
			return $this->lblUserId;
		}

		/**
		 * Create and setup QListBox lstProject
		 * @param string $strControlId optional ControlId to use
		 * @return QListBox
		 */
		public function lstProject_Create($strControlId = null) {
			$this->lstProject = new QListBox($this->objParentObject, $strControlId);
			$this->lstProject->Name = QApplication::Translate('Project');
			$this->lstProject->AddItem(QApplication::Translate('- Select One -'), null);
			$objProjectArray = TableProject::LoadAll();
			if ($objProjectArray) foreach ($objProjectArray as $objProject) {
				$objListItem = new QListItem($objProject->__toString(), $objProject->Id);
				if (($this->objTableWatchList->Project) && ($this->objTableWatchList->Project->Id == $objProject->Id))
					$objListItem->Selected = true;
				$this->lstProject->AddItem($objListItem);
			}
			return $this->lstProject;
		}

		/**
		 * Create and setup QLabel lblProjectId
		 * @param string $strControlId optional ControlId to use
		 * @return QLabel
		 */
		public function lblProjectId_Create($strControlId = null) {
			$this->lblProjectId = new QLabel($this->objParentObject, $strControlId);
			$this->lblProjectId->Name = QApplication::Translate('Project');
			$this->lblProjectId->Text = ($this->objTableWatchList->Project) ? $this->objTableWatchList->Project->__toString() : null;
			return $this->lblProjectId;
		}

		/**
		 * Create and setup QIntegerTextBox txtWatchTypeId
		 * @param string $strControlId optional ControlId to use
		 * @return QIntegerTextBox
		 */
		public function txtWatchTypeId_Create($strControlId = null) {
			$this->txtWatchTypeId = new QIntegerTextBox($this->objParentObject, $strControlId);
			$this->txtWatchTypeId->Name = QApplication::Translate('Watch Type Id');
			$this->txtWatchTypeId->Text = $this->objTableWatchList->WatchTypeId;
			return $this->txtWatchTypeId;
		}

		/**
		 * Create and setup QLabel lblWatchTypeId
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblWatchTypeId_Create($strControlId = null, $strFormat = null) {
			$this->lblWatchTypeId = new QLabel($this->objParentObject, $strControlId);
			$this->lblWatchTypeId->Name = QApplication::Translate('Watch Type Id');
			$this->lblWatchTypeId->Text = $this->objTableWatchList->WatchTypeId;
			$this->lblWatchTypeId->Format = $strFormat;
			return $this->lblWatchTypeId;
		}

		/**
		 * Create and setup QIntegerTextBox txtAlertTypeId
		 * @param string $strControlId optional ControlId to use
		 * @return QIntegerTextBox
		 */
		public function txtAlertTypeId_Create($strControlId = null) {
			$this->txtAlertTypeId = new QIntegerTextBox($this->objParentObject, $strControlId);
			$this->txtAlertTypeId->Name = QApplication::Translate('Alert Type Id');
			$this->txtAlertTypeId->Text = $this->objTableWatchList->AlertTypeId;
			return $this->txtAlertTypeId;
		}

		/**
		 * Create and setup QLabel lblAlertTypeId
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblAlertTypeId_Create($strControlId = null, $strFormat = null) {
			$this->lblAlertTypeId = new QLabel($this->objParentObject, $strControlId);
			$this->lblAlertTypeId->Name = QApplication::Translate('Alert Type Id');
			$this->lblAlertTypeId->Text = $this->objTableWatchList->AlertTypeId;
			$this->lblAlertTypeId->Format = $strFormat;
			return $this->lblAlertTypeId;
		}

		/**
		 * Create and setup QTextBox txtUrl
		 * @param string $strControlId optional ControlId to use
		 * @return QTextBox
		 */
		public function txtUrl_Create($strControlId = null) {
			$this->txtUrl = new QTextBox($this->objParentObject, $strControlId);
			$this->txtUrl->Name = QApplication::Translate('Url');
			$this->txtUrl->Text = $this->objTableWatchList->Url;
			$this->txtUrl->MaxLength = TableWatchList::UrlMaxLength;
			return $this->txtUrl;
		}

		/**
		 * Create and setup QLabel lblUrl
		 * @param string $strControlId optional ControlId to use
		 * @return QLabel
		 */
		public function lblUrl_Create($strControlId = null) {
			$this->lblUrl = new QLabel($this->objParentObject, $strControlId);
			$this->lblUrl->Name = QApplication::Translate('Url');
			$this->lblUrl->Text = $this->objTableWatchList->Url;
			return $this->lblUrl;
		}

		/**
		 * Create and setup QTextBox txtTitle
		 * @param string $strControlId optional ControlId to use
		 * @return QTextBox
		 */
		public function txtTitle_Create($strControlId = null) {
			$this->txtTitle = new QTextBox($this->objParentObject, $strControlId);
			$this->txtTitle->Name = QApplication::Translate('Title');
			$this->txtTitle->Text = $this->objTableWatchList->Title;
			$this->txtTitle->MaxLength = TableWatchList::TitleMaxLength;
			return $this->txtTitle;
		}

		/**
		 * Create and setup QLabel lblTitle
		 * @param string $strControlId optional ControlId to use
		 * @return QLabel
		 */
		public function lblTitle_Create($strControlId = null) {
			$this->lblTitle = new QLabel($this->objParentObject, $strControlId);
			$this->lblTitle->Name = QApplication::Translate('Title');
			$this->lblTitle->Text = $this->objTableWatchList->Title;
			return $this->lblTitle;
		}

		/**
		 * Create and setup QTextBox txtDescription
		 * @param string $strControlId optional ControlId to use
		 * @return QTextBox
		 */
		public function txtDescription_Create($strControlId = null) {
			$this->txtDescription = new QTextBox($this->objParentObject, $strControlId);
			$this->txtDescription->Name = QApplication::Translate('Description');
			$this->txtDescription->Text = $this->objTableWatchList->Description;
			$this->txtDescription->MaxLength = TableWatchList::DescriptionMaxLength;
			return $this->txtDescription;
		}

		/**
		 * Create and setup QLabel lblDescription
		 * @param string $strControlId optional ControlId to use
		 * @return QLabel
		 */
		public function lblDescription_Create($strControlId = null) {
			$this->lblDescription = new QLabel($this->objParentObject, $strControlId);
			$this->lblDescription->Name = QApplication::Translate('Description');
			$this->lblDescription->Text = $this->objTableWatchList->Description;
			return $this->lblDescription;
		}

		/**
		 * Create and setup QDateTimePicker calWatchDate
		 * @param string $strControlId optional ControlId to use
		 * @return QDateTimePicker
		 */
		public function calWatchDate_Create($strControlId = null) {
			$this->calWatchDate = new QDateTimePicker($this->objParentObject, $strControlId);
			$this->calWatchDate->Name = QApplication::Translate('Watch Date');
			$this->calWatchDate->DateTime = $this->objTableWatchList->WatchDate;
			$this->calWatchDate->DateTimePickerType = QDateTimePickerType::DateTime;
			return $this->calWatchDate;
		}

		/**
		 * Create and setup QLabel lblWatchDate
		 * @param string $strControlId optional ControlId to use
		 * @param string $strDateTimeFormat optional DateTimeFormat to use
		 * @return QLabel
		 */
		public function lblWatchDate_Create($strControlId = null, $strDateTimeFormat = null) {
			$this->lblWatchDate = new QLabel($this->objParentObject, $strControlId);
			$this->lblWatchDate->Name = QApplication::Translate('Watch Date');
			$this->strWatchDateDateTimeFormat = $strDateTimeFormat;
			$this->lblWatchDate->Text = sprintf($this->objTableWatchList->WatchDate) ? $this->objTableWatchList->WatchDate->__toString($this->strWatchDateDateTimeFormat) : null;
			return $this->lblWatchDate;
		}

		protected $strWatchDateDateTimeFormat;




		/**
		 * Refresh this MetaControl with Data from the local TableWatchList object.
		 * @param boolean $blnReload reload TableWatchList from the database
		 * @return void
		 */
		public function Refresh($blnReload = false) {
			if ($blnReload)
				$this->objTableWatchList->Reload();

			if ($this->lblId) if ($this->blnEditMode) $this->lblId->Text = $this->objTableWatchList->Id;

			if ($this->lstUser) {
					$this->lstUser->RemoveAllItems();
				if (!$this->blnEditMode)
					$this->lstUser->AddItem(QApplication::Translate('- Select One -'), null);
				$objUserArray = TableUserProject::LoadAll();
				if ($objUserArray) foreach ($objUserArray as $objUser) {
					$objListItem = new QListItem($objUser->__toString(), $objUser->Id);
					if (($this->objTableWatchList->User) && ($this->objTableWatchList->User->Id == $objUser->Id))
						$objListItem->Selected = true;
					$this->lstUser->AddItem($objListItem);
				}
			}
			if ($this->lblUserId) $this->lblUserId->Text = ($this->objTableWatchList->User) ? $this->objTableWatchList->User->__toString() : null;

			if ($this->lstProject) {
					$this->lstProject->RemoveAllItems();
				$this->lstProject->AddItem(QApplication::Translate('- Select One -'), null);
				$objProjectArray = TableProject::LoadAll();
				if ($objProjectArray) foreach ($objProjectArray as $objProject) {
					$objListItem = new QListItem($objProject->__toString(), $objProject->Id);
					if (($this->objTableWatchList->Project) && ($this->objTableWatchList->Project->Id == $objProject->Id))
						$objListItem->Selected = true;
					$this->lstProject->AddItem($objListItem);
				}
			}
			if ($this->lblProjectId) $this->lblProjectId->Text = ($this->objTableWatchList->Project) ? $this->objTableWatchList->Project->__toString() : null;

			if ($this->txtWatchTypeId) $this->txtWatchTypeId->Text = $this->objTableWatchList->WatchTypeId;
			if ($this->lblWatchTypeId) $this->lblWatchTypeId->Text = $this->objTableWatchList->WatchTypeId;

			if ($this->txtAlertTypeId) $this->txtAlertTypeId->Text = $this->objTableWatchList->AlertTypeId;
			if ($this->lblAlertTypeId) $this->lblAlertTypeId->Text = $this->objTableWatchList->AlertTypeId;

			if ($this->txtUrl) $this->txtUrl->Text = $this->objTableWatchList->Url;
			if ($this->lblUrl) $this->lblUrl->Text = $this->objTableWatchList->Url;

			if ($this->txtTitle) $this->txtTitle->Text = $this->objTableWatchList->Title;
			if ($this->lblTitle) $this->lblTitle->Text = $this->objTableWatchList->Title;

			if ($this->txtDescription) $this->txtDescription->Text = $this->objTableWatchList->Description;
			if ($this->lblDescription) $this->lblDescription->Text = $this->objTableWatchList->Description;

			if ($this->calWatchDate) $this->calWatchDate->DateTime = $this->objTableWatchList->WatchDate;
			if ($this->lblWatchDate) $this->lblWatchDate->Text = sprintf($this->objTableWatchList->WatchDate) ? $this->objTableWatchList->WatchDate->__toString($this->strWatchDateDateTimeFormat) : null;

		}



		///////////////////////////////////////////////
		// PROTECTED UPDATE METHODS for ManyToManyReferences (if any)
		///////////////////////////////////////////////





		///////////////////////////////////////////////
		// PUBLIC TABLEWATCHLIST OBJECT MANIPULATORS
		///////////////////////////////////////////////

		/**
		 * This will save this object's TableWatchList instance,
		 * updating only the fields which have had a control created for it.
		 */
		public function SaveTableWatchList() {
			try {
				// Update any fields for controls that have been created
				if ($this->lstUser) $this->objTableWatchList->UserId = $this->lstUser->SelectedValue;
				if ($this->lstProject) $this->objTableWatchList->ProjectId = $this->lstProject->SelectedValue;
				if ($this->txtWatchTypeId) $this->objTableWatchList->WatchTypeId = $this->txtWatchTypeId->Text;
				if ($this->txtAlertTypeId) $this->objTableWatchList->AlertTypeId = $this->txtAlertTypeId->Text;
				if ($this->txtUrl) $this->objTableWatchList->Url = $this->txtUrl->Text;
				if ($this->txtTitle) $this->objTableWatchList->Title = $this->txtTitle->Text;
				if ($this->txtDescription) $this->objTableWatchList->Description = $this->txtDescription->Text;
				if ($this->calWatchDate) $this->objTableWatchList->WatchDate = $this->calWatchDate->DateTime;

				// Update any UniqueReverseReferences (if any) for controls that have been created for it

				// Save the TableWatchList object
				$this->objTableWatchList->Save();

				// Finally, update any ManyToManyReferences (if any)
			} catch (QCallerException $objExc) {
				$objExc->IncrementOffset();
				throw $objExc;
			}
		}

		/**
		 * This will DELETE this object's TableWatchList instance from the database.
		 * It will also unassociate itself from any ManyToManyReferences.
		 */
		public function DeleteTableWatchList() {
			$this->objTableWatchList->Delete();
		}		



		///////////////////////////////////////////////
		// PUBLIC GETTERS and SETTERS
		///////////////////////////////////////////////

		/**
		 * Override method to perform a property "Get"
		 * This will get the value of $strName
		 *
		 * @param string $strName Name of the property to get
		 * @return mixed
		 */
		public function __get($strName) {
			switch ($strName) {
				// General MetaControlVariables
				case 'TableWatchList': return $this->objTableWatchList;
				case 'TitleVerb': return $this->strTitleVerb;
				case 'EditMode': return $this->blnEditMode;

				// Controls that point to TableWatchList fields -- will be created dynamically if not yet created
				case 'IdControl':
					if (!$this->lblId) return $this->lblId_Create();
					return $this->lblId;
				case 'IdLabel':
					if (!$this->lblId) return $this->lblId_Create();
					return $this->lblId;
				case 'UserIdControl':
					if (!$this->lstUser) return $this->lstUser_Create();
					return $this->lstUser;
				case 'UserIdLabel':
					if (!$this->lblUserId) return $this->lblUserId_Create();
					return $this->lblUserId;
				case 'ProjectIdControl':
					if (!$this->lstProject) return $this->lstProject_Create();
					return $this->lstProject;
				case 'ProjectIdLabel':
					if (!$this->lblProjectId) return $this->lblProjectId_Create();
					return $this->lblProjectId;
				case 'WatchTypeIdControl':
					if (!$this->txtWatchTypeId) return $this->txtWatchTypeId_Create();
					return $this->txtWatchTypeId;
				case 'WatchTypeIdLabel':
					if (!$this->lblWatchTypeId) return $this->lblWatchTypeId_Create();
					return $this->lblWatchTypeId;
				case 'AlertTypeIdControl':
					if (!$this->txtAlertTypeId) return $this->txtAlertTypeId_Create();
					return $this->txtAlertTypeId;
				case 'AlertTypeIdLabel':
					if (!$this->lblAlertTypeId) return $this->lblAlertTypeId_Create();
					return $this->lblAlertTypeId;
				case 'UrlControl':
					if (!$this->txtUrl) return $this->txtUrl_Create();
					return $this->txtUrl;
				case 'UrlLabel':
					if (!$this->lblUrl) return $this->lblUrl_Create();
					return $this->lblUrl;
				case 'TitleControl':
					if (!$this->txtTitle) return $this->txtTitle_Create();
					return $this->txtTitle;
				case 'TitleLabel':
					if (!$this->lblTitle) return $this->lblTitle_Create();
					return $this->lblTitle;
				case 'DescriptionControl':
					if (!$this->txtDescription) return $this->txtDescription_Create();
					return $this->txtDescription;
				case 'DescriptionLabel':
					if (!$this->lblDescription) return $this->lblDescription_Create();
					return $this->lblDescription;
				case 'WatchDateControl':
					if (!$this->calWatchDate) return $this->calWatchDate_Create();
					return $this->calWatchDate;
				case 'WatchDateLabel':
					if (!$this->lblWatchDate) return $this->lblWatchDate_Create();
					return $this->lblWatchDate;
				default:
					try {
						return parent::__get($strName);
					} catch (QCallerException $objExc) {
						$objExc->IncrementOffset();
						throw $objExc;
					}
			}
		}

		/**
		 * Override method to perform a property "Set"
		 * This will set the property $strName to be $mixValue
		 *
		 * @param string $strName Name of the property to set
		 * @param string $mixValue New value of the property
		 * @return mixed
		 */
		public function __set($strName, $mixValue) {
			try {
				switch ($strName) {
					// Controls that point to TableWatchList fields
					case 'IdControl':
						return ($this->lblId = QType::Cast($mixValue, 'QControl'));
					case 'UserIdControl':
						return ($this->lstUser = QType::Cast($mixValue, 'QControl'));
					case 'ProjectIdControl':
						return ($this->lstProject = QType::Cast($mixValue, 'QControl'));
					case 'WatchTypeIdControl':
						return ($this->txtWatchTypeId = QType::Cast($mixValue, 'QControl'));
					case 'AlertTypeIdControl':
						return ($this->txtAlertTypeId = QType::Cast($mixValue, 'QControl'));
					case 'UrlControl':
						return ($this->txtUrl = QType::Cast($mixValue, 'QControl'));
					case 'TitleControl':
						return ($this->txtTitle = QType::Cast($mixValue, 'QControl'));
					case 'DescriptionControl':
						return ($this->txtDescription = QType::Cast($mixValue, 'QControl'));
					case 'WatchDateControl':
						return ($this->calWatchDate = QType::Cast($mixValue, 'QControl'));
					default:
						return parent::__set($strName, $mixValue);
				}
			} catch (QCallerException $objExc) {
				$objExc->IncrementOffset();
				throw $objExc;
			}
		}
	}
?>